import request from '@/utils/request'
import { praseStrEmpty } from "@/utils/ruoyi";

// 查询用工需求列表
export function getOperationNeedList(query) {
  return request({
    url: '/operation/need/getOperationNeedList',
    method: 'get',
    params: query
  })
}

// 新增用工需求请求
export function addShowOperationNeed() {
  return request({
    url: '/operation/need/addShowOperationNeed',
    method: 'get'
  })
}

// 删除用工需求
export function deleteOperationNeed(operationNeedId) {
  return request({
    url: '/operation/need/deleteOperationNeed/' + operationNeedId,
    method: 'delete'
  })
}
// 用工需求审核
export function auditOperationNeed(data) {
  return request({
    url: '/operation/need/auditOperationNeed',
    method: 'post',
    data: data
  })
}
// 新增用工需求
export function addOperationNeed(data) {
  return request({
    url: '/operation/need/addOperationNeed',
    method: 'post',
    data: data
  })
}

/**
 * 用工需求详情
 * @param operationNeedId
 */
export function viewOperationNeed(operationNeedId) {
  return request({
    url: '/operation/need/viewOperationNeed/' + operationNeedId,
    method: 'get'
  })
}

/**
 * 修改用工需求
 * @param data
 */
export function updateOperationNeed(data) {
  return request({
    url: '/operation/need/updateOperationNeed',
    method: 'post',
    data: data
  })
}

